﻿using System.Collections;

namespace FeedbackNetwork.dataset
{
    abstract class Dataset
    {
        protected ArrayList data = new ArrayList();
        public object GetItem(int index)
        {
            return this.data[index];
        }

        public void AddData(object obj)
        {
            this.data.Add(obj);
        }

        public  int Length()
        {
            return this.data.Count;
        }

        public ArrayList GetItem(int start, int end)
        {
            ArrayList result = new ArrayList();
            if (end > this.data.Count) end = this.data.Count;
            for(int i = start; i < end; i++)
            {
                result.Add(this.data[i]);
            }
            return result;
        }

    }
}
